home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1993-10-24 | 8.8 KB | 328 lines | [ TEXT/ttxt]
18 Special Routines ```````````````````` Use these routines with caution, or don’t use them! ``````````````````````````````````````````````````` The following routines should be used with caution, or not at all. The “comments or special instructions” column often provides an equivalent Tools Plus routine. It will also explain if the routine can be used in a limited way, or if a Tools Plus equivalent should be used instead. If Inside Macintosh states that the routine should not be called because it is automatically called by the system when it starts up, you need not reference the routine in this section. Some routines that are not listed here can be used, but they will require a pointer to a window. Your application will have to use Tools Plus’s WindowPointer routine to determine a window’s pointer. Toolbox Routine Comments or Special Instructions ``````````````` `````````````````````````````````````````````````````` AddResMenu Use AppleMenu AppendMenu Use Menu BackPat A window's background pattern should never be changed from white BringToFront CheckItem Use CheckMenu ClearMenuBar CloseWindow Use WindowClose DeleteMenu Use RemoveMenu DelMenuItem Use RemoveMenu DialogSelect Modal dialogs are allowed, but a Tools Plus window is easier to use DisableItem Use EnableMenu DisposeControl Use with custom controls only DisposeMenu DisposeWindow DlgCopy DlgCut DlgDelete DlgPaste DragControl Use with custom controls only DragWindow Draw1Control Use with custom controls only DrawGrowIcon DrawMenuBar Use UpdateMenuBar EnableItem Use EnableMenu EventAvail Your application will intercept some events so that they never reach Tools Plus. Also note that under MultiFinder and System 7.0 (or later), this routine will switch tasks to other applications and desk accessories. Don’t use this routine unless you really know what you are doing and you thoroughly test your results. FindControl Done automatically for buttons and scroll bars FindWindow FlashMenuBar FlushEvents InitToolsPlus flushes all events when Tools Plus is initialized. You may flush mouse-down, mouse-up, key- down, key-up and auto-key events, as well as application-defined events 1 through 4. When flushing mouse-up events, you may be disrupting a drag that is already in progress. If the StillDown function returns true, a drag is in progress, and PollSystem will continue processing the drag until a mouse-up event is encountered. As a rule, don’t use this routine unless you really know what you are doing and you thoroughly test your results. GetCRefCon Use with custom controls only GetCTitle Use with custom controls only GetCtlMax Use with custom controls only. For scroll bars, use GetScrollBarMax GetCtlMin Use with custom controls only. For scroll bars, use GetScrollBarMin GetCtlValue Use with custom controls only. For scroll bars, use GetScrollBarVal. For buttons (check boxes or radio buttons), use ButtonIsSelected GetMenu No equivalent in Tools Plus because menus can’t be defined as resources. Use Menu instead. GetNewControl No equivalent in Tools Plus because buttons and scroll bars can’t be defined as resources. Use NewButton or NewScrollBar instead. Can be used for custom controls. GetNewMBar No equivalent in Tools Plus because menus can’t be defined as resources. Use Menu instead. GetNewWindow No equivalent in Tools Plus because windows can’t be defined as resources. Use WindowOpen instead. GetNextEvent Your application will intercept events so that they never reach Tools Plus. Also note that under MultiFinder and System 7.0 (or later), this routine will switch tasks to other applications and desk accessories. Don’t use this routine unless you really know what you are doing and you thoroughly test your results. GetOSEvent Your application will intercept events so that they never reach Tools Plus. Also note that under MultiFinder and System 7.0 (or later), this routine will switch tasks to other applications and desk accessories. As a rule, don’t use this routine unless you really know what you are doing and you thoroughly test your results. GrowWindow HideControl Use with custom controls only HideWindow HiliteControl Use with custom controls only. For scroll bars, use EnableScrollBar. For buttons, use EnableButton. HiliteMenu Use MenuHilite HiliteWindow InitCursor Use CursorShape or ResetCursor routines instead InitDialogs InitMenus InitWindows InsertMenu Use Menu InsertResMenu InsMenuItem Use InsertMenuItem IsDialogEvent Modal dialogs are allowed, but a Tools Plus window is easier to use KillControls List Manager List Manager routines may be incorporated into your application to handle sophisticated lists. However, the list’s scroll bars must be flagged as “custom controls,” and your application must handle all events pertaining to the list. MenuSelect MoveControl Use with custom controls only MovePortTo The co-ordinates may be changed temporarily, providing they are reset prior to calling any Tools Plus routine MoveWindow NewControl Use with custom controls only. For scroll bars, use NewScrollBar. For buttons, use NewButton NewMenu Use Menu NewWindow Use WindowOpen OpenDeskAcc SelectWindow Use ActivateWindow SendBehind SetCRefCon Use with custom controls only SetCTitle Use with custom controls only. For buttons, use ButtonTitle SetCtlMax Use with custom controls only. For scroll bars, use SetScrollBarMax SetCtlMin Use with custom controls only. For scroll bars, use SetScrollBarMin SetCtlValue Use with custom controls only. For scroll bars, use SetScrollBarVal. For buttons (check boxes or radio buttons), use SelectButton. SetCursor Use CursorShape or ResetCursor routines instead SetEventMask Upon startup, key-up events are disabled. Do not disable the following events: mouseDown, MouseUp, keyDown, autoKey, updateEvt, activateEvt, and app4Evt SetItem Use RenameItem SetItemIcon SetItemMark Use MenuMark SetItemStyle Use MenuStyle SetMenuBar SetOrigin The co-ordinates may be changed temporarily, providing they are reset prior to calling any Tools Plus routine SetWTitle Use WindowTitle ShowControl Use with custom controls only ShowHide ShowWindow SizeControl Use with custom controls only SizeWindow SpaceExtra SpaceExtra must be set to 0, the initial value, when calling any Tools Plus routine SystemClick SystemEdit SystemEvent SystemMenu TEActive Use ActivateField TEAutoView TECalc TEClick Use ClickInField TECopy TECut TEDeactivate Use DeactivateField TEDelete TEDispose Use DeleteField TEFromScrap TEGetText Use GetFieldString TEIdle Called in SystemTasks TEInit TEInsert TEKey TENew Use NewField TEPaste TEPinScroll TEScroll TESelect TESelView TESetJust TESetText TEToScrap TEUpdate TrackBox TrackControl Done automatically for buttons and scroll bars TrackGoAway UnloadSeg Do not unload the segments containing Tools Plus’s libraries UpdtControl WaitNextEvent Your application will intercept events so that they never reach Tools Plus. Also note that under MultiFinder and System 7.0 (or later), this routine will switch tasks to other applications and desk accessories. Don’t use this routine unless you really know what you are doing and you thoroughly test your results. ZoomWindow